<?php 
include './include/conf.php';


$nom = (isset($_POST['nom'])) ? $_POST['nom'] : NULL;
$prenom = (isset($_POST['prenom'])) ? $_POST['prenom'] : NULL;
$id = (isset($_POST['id'])) ? $_POST['id'] : NULL;

$insert = $pdo->prepare("INSERT INTO louer (id_adherent, id_parcelle) SELECT id_adherent, id_parcelle FROM adherent, parcelle where adherent.nom ='$nom' AND adherent.prenom ='$prenom' AND parcelle.id_parcelle ='$id'");
$insert->execute();
?>